#ifndef CGAINFOCUSEVENTOBSERVER_H_
#define CGAINFOCUSEVENTOBSERVER_H_

#include <e32base.h>
#include <w32std.h>

class MFocusEventObserver
	{
public:	
	virtual void Notify(TInt event) = 0;
	};

class CGainFocusEventObserver : public CActive
	{
public:
    static CGainFocusEventObserver* NewL(MFocusEventObserver& aObserver,
                                         TInt aWgroup);
	~CGainFocusEventObserver();
private:
	CGainFocusEventObserver(MFocusEventObserver& aObserver);
    void ConstructL(TInt aWgroup);
	
	void RunL();
	void DoCancel();

	void startListening();

private:
	//data
	MFocusEventObserver *iObserver;
	RWsSession 			*iSession;
    RWindowGroup        *iWGroup;
};

#endif /* CGAINFOCUSEVENTOBSERVER_H_ */
